> Simple crud avec AngularJs 1 Dans ce scripts, nous allons voir comment faire un simple mise à jour avec Angular 1 index.html Ajouter Nom Pays {{ profile.name }} {{ profile.country }} scripts.js angular.module('App', []).controller('CrudCtrl', ['$scope', function($scope) { $scope.Profiles = [ { name : "Said", country : "Maroc", editable : false }, { name : "Mezgani", country : "thailand", editable : false } ]; $scope.entity = {} $scope.edit = function(index){ $scope.entity = $scope.Profiles[index]; $scope.entity.index = index; $scope.entity.editable = true; } $scope.delete = function(index){ $scope.Profiles.splice(index,1); } $scope.save = function(index){ $scope.Profiles[index].editable = false; } $scope.add = function(){ $scope.Profiles.push({ name : "", country : "", editable : true }) } } ]);